package com.xueyi.aixihu.service;

import com.xueyi.aixihu.entity.vo.CascaderDataVo;
import com.xueyi.aixihu.entity.vo.DtNewsSortTreeVo;
import com.xueyi.aixihu.entity.vo.SelectVo;
import com.xueyi.aixihu.exception.SzException;
import com.xueyi.aixihu.reqeust.FindClassifyListByPidReq;
import com.xueyi.aixihu.reqeust.FindClassifyReq;
import com.xueyi.aixihu.response.DtNewsSortListResponse;
import com.xueyi.aixihu.response.FindThreeClassifyByIdResponse;
import com.xueyi.aixihu.response.TwoClassifyResponse;
import com.xueyi.aixihu.response.base.BaseResponse;

import java.util.List;

/**
 * @authoer:hxs
 * @createDate:2022/8/16
 * @description: 文章、社区分类操作业务
 */
public interface DtNewsSortService {
    /**
     * 页面初始化时查询分类
     *
     * @return
     */
    DtNewsSortListResponse findAllClassify();


    /**
     * 通过一级菜单id查询二级菜单以及三级菜单
     *
     * @param findClassifyReq
     * @return
     */
    TwoClassifyResponse findTwoClassifyById(FindClassifyReq findClassifyReq) throws SzException;

    /**
     * 通过二级分类id查询三级分类
     *
     * @param findClassifyReq
     * @return
     */
    List<SelectVo> findThreeClassifyById(FindClassifyListByPidReq findClassifyReq) throws SzException;

    /**
     * 返回联级菜单数据
     *
     * @return
     */
    List<CascaderDataVo> findCascaderData();

    /**
     * 查询出树级结果的菜单
     *
     * @return
     */
    List<DtNewsSortTreeVo> findTree();

    /**
     * 删除类型管理树的结点
     *
     * @param id
     */
    BaseResponse<Boolean> deleteTreeNode(Integer id);

    /**
     * 增加类型管理树的结点
     *
     * @param pid
     * @param name
     */
    BaseResponse<Boolean> addTreeNode(Integer pid, String name);

    /**
     * 通过二级查三级
     */
    FindThreeClassifyByIdResponse findFourClassifyById(FindClassifyListByPidReq findClassifyReq);
}
